package com.wjv.example.spbt.es.config;

import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;

/**
 * <p>Title: EsClientConfig</p>
 *
 * @author wjv
 * @since 2022/1/25 18:29
 */
@Configuration
public class EsClientConfig   {

    // @Autowired
    // private RestHighLevelClient restHighLevelClient;
    //

    // 如果没有则默认创建 ElasticsearchRestTemplate
    // @Bean
    // public ElasticsearchRestTemplate elasticsearchRestTemplate() {
    //     System.out.println("ElasticsearchRestTemplate");
    //     return new ElasticsearchRestTemplate(restHighLevelClient);
    // }

}
